package Module;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Hashtable;

/*
 * This provides an interface of status service in workers.
 */
public interface StatusService extends Remote {
    public enum WorkerStatus {active, running, dead};

    public enum JobStatus {parepare, ready, running, done, failed, cancel}

    public WorkerStatus getWorkerStatus(String authCode)
    	throws RemoteException;

    public JobStatus getJobStatus(int jobID, String authCode) 
    	throws RemoteException;
    
    public Hashtable<Integer, JobStatus> getJobsStatus(String authCode) 
    	throws RemoteException;
    
    public void clearStatus( String authCode) 
    	throws RemoteException;
    
    public void setJobStatus(int jobID, JobStatus jobStatus, String authCode) 
    	throws RemoteException;
}
